package com.corner.model.cornerservice.service;

import com.corner.model.cornerservice.domain.Like;
import com.corner.model.cornerservice.service.exception.BaseException;

import java.util.List;
import java.util.Map;

import retrofit.http.Body;
import retrofit.http.DELETE;
import retrofit.http.GET;
import retrofit.http.POST;
import retrofit.http.PUT;
import retrofit.http.Path;
import retrofit.http.Query;

public interface LikeService {
    @GET("/like/count")
    Map<String, Long> count()
            throws BaseException;

    @GET("/like/count")
    Map<String, Long> count(@Query("query") String query) throws BaseException;

    @GET("/like")
    List<Like> list()
            throws BaseException;

    @GET("/like")
    List<Like> list(@Query("query") String query) throws BaseException;

    @GET("/like/{objectId}")
    Like get(@Path("objectId") Long objectId) throws BaseException;

    @GET("/like/{objectId}")
    Like get(@Path("objectId") Long objectId, @Query("query") String query) throws BaseException;

    @PUT("/like/{objectId}")
    Map<String, Object> update(@Path("objectId") Long objectId,
                               @Body Like like)
            throws BaseException;

    @DELETE("/like/{objectId}")
    Map<String, Object> delete(@Path("objectId") Long objectId) throws BaseException;

    @POST("/like")
    Map<String, Object> save(@Body Like like) throws BaseException;


}
